package edu.colorado.csci5548.gps_messenger;

public class MessageManager 
{
	private Message _sosMessage;
	private Message _helpMessage;
	private Message _message1;
	private Message _message2;

	// constructors
	MessageManager()
	{
		this(new Message(""), new Message(""), new Message(""), new Message(""));
	}
	
	MessageManager(Message sosMessage, Message helpMessage, Message message1, Message message2)
	{
		_sosMessage = new Message(sosMessage);
		_helpMessage = new Message(helpMessage);
		_message1 = new Message(message1);
		_message2 = new Message(message2);
	}

	MessageManager(MessageManager messageManager)
	{
		this(messageManager.getSOSMessage(), messageManager.getHelpMessage(), 
				messageManager.getMessage1(), messageManager.getMessage2());
	}	
	
	// getters
	public Message getSOSMessage()
	{
		return new Message(_sosMessage);
	}
	
	public Message getHelpMessage()
	{
		return new Message(_helpMessage);
	}
	
	public Message getMessage1()
	{
		return new Message(_message1);
	}
	
	public Message getMessage2()
	{
		return new Message(_message2);
	}
	
	// setters
	public void setSOSMessage(Message sosMessage)
	{
		_sosMessage = new Message(sosMessage);
	}
	
	public void setHelpMessage(Message helpMessage)
	{
		_helpMessage = new Message(helpMessage);
	}
	
	public void setMessage1(Message message1)
	{
		_message1 = new Message(message1);
	}
	
	public void setMessage2(Message message2)
	{
		_message2 = new Message(message2);
	}
	
	// other methods
	public String toString()
	{
		return ("SOS Message: " + _sosMessage + "\n" +
				"Help Message: " + _helpMessage + "\n" +
				"Message1: " + _message1 + "\n" +
				"Message2: " + _message2 + "\n");
	}
}
